<%= javascript_include_tag 'jquery.sortable.js' %>
<%= javascript_include_tag 'sort_products.js' %>

<div id='breadcrumb'>
  <a href="/">首页</a>&gt;<a href="/categories/<%=@category.id%>"><%=h @category.name%></a>&gt;品牌排序(直接拖拽)
</div>
<ul id='sort_ul'>
  <% if @brands %>
    <% for b in @brands %>
      <li class='sortableitem' id='<%=b.id%>'>
        <%=h b.name %>
      </li>
    <% end %>
  </ul>
  <button   onclick="print_ul('/brands/update_sort_order')">保存顺序</button>
  <a href="/categories/<%=@category.id%>" class="action_back">返回</a>
<% end %>

<div style=""display:none id='hidden_form'>
  <%= form_tag('/categories')  %>
</div>
